
uniform float fScale;
uniform vec2 fvDirection;
// const vec2 fvDirection = vec2(1.0, 0.0);
// const float fScale = 0.004;

// uniform sampler2D frame;
uniform sampler2D pass;

varying vec2 TexCoord;

void main(void)
{
	vec4 color = texture2D(pass, TexCoord) * 70.0;

	color += texture2D(pass, vec2(TexCoord.x-(fvDirection.x)*fScale, TexCoord.y-(fvDirection.y)*fScale)) * 56.0;
	color += texture2D(pass, vec2(TexCoord.x+(fvDirection.x)*fScale, TexCoord.y+(fvDirection.y)*fScale)) * 56.0;
	
	color += texture2D(pass, vec2(TexCoord.x-(fvDirection.x*2.0)*fScale, TexCoord.y-(fvDirection.y*2.0)*fScale)) * 28.0;
	color += texture2D(pass, vec2(TexCoord.x+(fvDirection.x*2.0)*fScale, TexCoord.y+(fvDirection.y*2.0)*fScale)) * 28.0;
	
	color += texture2D(pass, vec2(TexCoord.x-(fvDirection.x*3.0)*fScale, TexCoord.y-(fvDirection.y*3.0)*fScale)) * 8.0;
	color += texture2D(pass, vec2(TexCoord.x+(fvDirection.x*3.0)*fScale, TexCoord.y+(fvDirection.y*3.0)*fScale)) * 8.0;

	color += texture2D(pass, vec2(TexCoord.x-(fvDirection.x*4.0)*fScale, TexCoord.y-(fvDirection.y*4.0)*fScale)) * 1.0;
	color += texture2D(pass, vec2(TexCoord.x+(fvDirection.x*4.0)*fScale, TexCoord.y+(fvDirection.y*4.0)*fScale)) * 1.0;

	gl_FragColor = (color / 256.0);
}
